<?php
interface interface_auth {
    // return true if login is valid
    // set user id in session, calls 
    // user_dao to get permissions, 
    // update ip and session
    public function login($username, $password);

    // logout current user
    public function logout();

    // return user dao object
    public function get_dao();

    // set token in session
    public function set_token();

    // return true if token is valid
    public function validate_token();

    // return true if user is logged in
    public function is_logged();

    // return logged user type   
    public function get_user_type(); 

    // return logged user id  
    public function get_user_id(); 

    // return logged user object
    public function get_user(); 

    // verify if user as permission
    public function has_permission($key, $value);

}
